#!/bin/bash

# 函数定义
check_package_installed() {
    package_name=$1
    if dpkg -l | grep "^ii" | grep -qw "$package_name"; then
        echo "$package_name 已安装"
    else
        echo "$package_name 未安装"
    fi
}

# 使用示例
check_package_installed $1
